package ift585.tp2;

public class Neighbors {

	private String address = null;
	private int cost = 1000000;
	private boolean estHost = false;
	
	public Neighbors(String address, int cost, boolean estHost){
		this.address = address;
		this.cost = cost;
		this.estHost = estHost;
	}
	
	public String getAddress() {
		return address;
	}

	public int getCost() {
		return cost;
	}

	public boolean estHost() {
		return estHost;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + cost;
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Neighbors other = (Neighbors) obj;
		if (address == null) {
			if (other.address != null)
				return false;
		} else if (!address.equals(other.address))
			return false;
		if (cost != other.cost)
			return false;
		return true;
	}
}
